package cn.yunlang.zhangZhongFei.util;

import java.security.SecureRandom;
import java.util.Calendar;
import java.util.Date;


public class CommonUtil {
    public static String creatOrder() {
        return new SnowflakeIdWorkerUtil(1, 3).nextId() + "";
    }
    public static String creatCode() {
        SecureRandom random = new SecureRandom();
        int i = random.nextInt(899999) + 100000;
        return i + "";
    }
    public static Date changeDate(Date date, Integer days){
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.add(Calendar.DATE,days);
        date = cal.getTime();
        return date;
    }
}
